<!--sidebar-menu-->
<div id="sidebar" class="clearfix"><!-- <a href="#" class="visible-phone"><i class="icon icon-home"></i> Dashboard</a> -->
    <ul style="display: block;">
     {% include "common/menu.html" %}
    </ul>
</div>
<!--end sidebar-menu-->

<div id="content">

    <div class="container-fluid">
        <!--统计 boxes-->

        <div class="quick-actions_homepage clearfix">
            <ul class="quick-actions">
                <li style="cursor: pointer;">
                    <a href="/index/allroom">
                        <div class="title">正在直播/房间总数</div>
                        <div class="number">{{liveRoomNum}}/{{roomNum}}</div>
                        <!-- <label class="bg-o"><i class="custom-icon custom-icon-user"></i></label> -->
                        <label class="bg-r"><i class="custom-icon custom-icon-video"></i></label>
                    </a>

                </li>

                <li>
                    <div class="title">今日消费总额(聊币)</div>
                    <div class="number">{{newCashNum}}</div>
                   <!--  <label class="bg-r"><i class="custom-icon custom-icon-video"></i></label> -->
				    <label class="bg-ggg"><i class="custom-icon custom-icon-money"></i></label>
                </li>

                <li>
                    <div class="title">今日实际消费总额(聊币)</div>
                    <div class="number">{{newRealCashNum}}</div>
                   <!--  <label class="bg-r"><i class="custom-icon custom-icon-video"></i></label> -->
                    <label class="bg-ggg"><i class="custom-icon custom-icon-money"></i></label>
                </li>

                <li>
                    <div class="title">今日新签约主播</div>
                    <div class="number">{{newInchorNum}}</div>
                    <label class="bg-b"><i class="custom-icon custom-icon-signing"></i></label>
                </li>

                <li>
                    <div class="title">今日新创建家族</div>
                    <div class="number">{{newFamilyNum}}</div>
                    <!-- <label class="bg-ggg"><i class="custom-icon custom-icon-money"></i></label> -->
					<label class="bg-o"><i class="custom-icon custom-icon-user"></i></label>
                </li>

            </ul>
        </div>
        <!--End-统计 boxes--> 

    </div>

    <div class="container-fluid ">
        <div class="row-fluid">
            <div style="width: 1000px;">
                <div class="span12">
                    <div class="widget-box" style="margin-left: 90px;">
                        <div class="widget-title" data-toggle="collapse"><!--  href="#collapseG2" -->
                            <!-- <span class="icon"><i class="icon-chevron-down"></i></span> -->
                            <h3>待处理</h3>
                        </div>

                        <div class="widget-content nopadding in collapse" id="collapseG2" style="height: auto;">
                            <ul id="applyListRec" class="recent-posts">

                            </ul>
                        </div>

                        <div class="row-fluid" style="margin-top: 10px;">
                            <div id="pagination" class="pagination alternate pull-right"></div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>


</div>

<script type="text/javascript">

$(function(){
    getApplyList();
});

function getApplyList(index){
    var data={};
    data.page=index||1;
    data.pageSize=global.pageSize;

    $.ajax({
        type:"POST",
        data:data,
        url:'/ajax/applyList',
        dataType:'json',
        success:function(res){
            var data=res.data,
                    eul=global.doc('applyListRec');
            $('#applyListRec').children().remove();
            for (var i = 0; i <data.list.length; i++) {
                addRow(eul,data.list[i]);
            };

            if(!index||index==0){
                utilsPagination("#pagination",data.count,global.pageSize,function(page_index, jq){
                    page_index+=1;
                    getApplyList(page_index);
                });
            }

        }
    });
}

function addRow(table,data){
    var li=document.createElement('li'),
        div=document.createElement('div'),
        div2=document.createElement('div');

    li.className=data.type==2?"br-b":"br-ggg";
    div.className="user-thumb";
    div.innerHTML=data.type==2?"<p><span>签约</span></p><p><span>申请</span></p>":"<p><span>家族</span></p><p><span>申请</span></p>";
    div2.className="article-post";
    div2.innerHTML='<h3 class="user-info"><span>'+data.nickName+'</span><span>'+(data.type==2?" 申请主播签约 ":" 申请创建家族")+'</span></h3><p>'+data.time+'</p><a href="'+data.url+'" class="btn ">查&nbsp;看</a>';

    li.appendChild(div);
    li.appendChild(div2);
    table.appendChild(li);
}

</script>